﻿using mscook.core.domain;
using mscook.core.repositories;
using mscook.core.utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mscook.core.services
{
    public class PurchasedThingService : IPurchasedThingService
    {
        private IPurchasedThingRepository iPurchasedThingRepository;
        //private ILogger iLogger;
        public PurchasedThingService(IPurchasedThingRepository iPurchasedThingRepository)
        {
            this.iPurchasedThingRepository = iPurchasedThingRepository;
            //this.iLogger = iLogger;
        }

        public IList<PurchasedThing> SelectAll()
        {
            return iPurchasedThingRepository.GetAll();
        }

        public PurchasedThing SelectById(string id)
        {
            return iPurchasedThingRepository.Get(id);
        }

        public IList<PurchasedThing> GetBy(LoginUser loginUser)
        {
            return iPurchasedThingRepository.GetBy(loginUser);
        }

        public IList<PurchasedThing> GetBy(LoginUser loginUser, PurchasedCategory category)
        {
            return iPurchasedThingRepository.GetBy(loginUser,category);
        }
    }
}
